Skip to main content

Getting Started

Creating a New Widget

Use the Nx generator to scaffold a new widget:

Bash
nx generate @cdx-extensions/widget-template-web:widget <widget-name>

This creates a new app under widgets/web/ with the required Module Federation configuration. Only modify files inside src/app/ for your widget logic and UI.

File / FolderCan you edit?Notes
src/app/YesAll your widget UI and business logic goes here
src/environments/YesSet apiUrl and feature flags per environment
src/assets/YesAdd images, fonts, static files
module-federation.config.tsPartiallyOnly change name and exposes
project.jsonPartiallyOnly change port under serve / serve-static
webpack.config.tsNoRequired for Module Federation — any change breaks loading in OLB
bootstrap.tsx / main.tsNoRequired async boundary for Module Federation
tsconfig*.json / jest.config.tsNoRequired for build and test tooling

Next Steps

Web development guides: